package com._21cn.cms.site.entity;

import com._21cn.cms.common.Constants;

import java.io.Serializable;

public class Column implements Serializable {
	private static final long serialVersionUID = -1L;	
	
	private Integer id = 0;
	private Integer siteId = 0;
	private Integer channelId = 0;
	private Integer parentId = 0;
	private String name;
	private String code;
	private String path;
	private String url;
	private String metaKeyword;
	private String metaDescription;
	private String memo;
	private Integer status;
	private Integer listTemplateId;
	private java.util.Date createTime;
	private Integer createUserId;
	private java.util.Date modifyTime;
	private Integer modifyUserId;
    private Channel channel = new Channel();
    private Site site = new Site();
    private Column parentColumn = null;
    private String siteName = "";
    private String channelName = "";
    private String parentColumnName = "";
    private String templateName = "";
    private Integer isShow = Constants.IS_SHOW;

    public Integer getIsShow() {
        return this.isShow;
    }
    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }
    public String getTemplateName() {
        return this.templateName;
    }
    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getParentColumnName() {
        return parentColumnName;
    }

    public void setParentColumnName(String parentColumnName) {
        this.parentColumnName = parentColumnName;
    }

    public Column getParentColumn() {
        if( parentColumn == null && parentId > 0 ) {
            parentColumn = new Column();
            parentColumn.id = parentId;
        }
        return parentColumn;
    }

    public void setParentColumn(Column parentColumn) {
        this.parentColumn = parentColumn;
        if( parentColumn != null ) {
            parentId = parentColumn.id;
        }
    }

    public Channel getChannel() {
        return channel;
    }

    public void setChannel(Channel channel) {
        this.channel = channel;
    }

    public Site getSite() {
        return site;
    }

    public void setSite(Site site) {
        this.site = site;
    }

    public void setId(Integer id) {
        this.id = id;  
    }        
	
    public Integer getId() {  
        return this.id;  
    }  
    public void setSiteId(Integer siteId) {  
        this.siteId = siteId;  
    }        
	
    public Integer getSiteId() {
        if( site!=null && site.getId()>0){
            return site.getId();
        }
        return this.siteId;  
    }  
    public void setChannelId(Integer channelId) {  
        this.channelId = channelId;  
    }        
	
    public Integer getChannelId() {
        if (this.channelId > 0) {
            return this.channelId;
        }
        if( channel!=null && channel.getId()>0 ){
            return channel.getId();
        }
        return this.channelId;
    }  
    public void setParentId(Integer parentId) {  
        this.parentId = parentId;  
    }        
	
    public Integer getParentId() {  
        return this.parentId;  
    }  
    public void setName(String name) {  
        this.name = name;  
    }        
	
    public String getName() {  
        return this.name;  
    }  
    public void setCode(String code) {  
        this.code = code;  
    }        
	
    public String getCode() {  
        return this.code;  
    }  
    public void setPath(String path) {  
        this.path = path;  
    }        
	
    public String getPath() {  
        return this.path;  
    }  
    public void setUrl(String url) {  
        this.url = url;  
    }        
	
    public String getUrl() {  
        return this.url;  
    }  
    public void setMetaKeyword(String metaKeyword) {  
        this.metaKeyword = metaKeyword;  
    }        
	
    public String getMetaKeyword() {  
        return this.metaKeyword;  
    }  
    public void setMetaDescription(String metaDescription) {  
        this.metaDescription = metaDescription;  
    }        
	
    public String getMetaDescription() {  
        return this.metaDescription;  
    }  
    public void setMemo(String memo) {  
        this.memo = memo;  
    }        
	
    public String getMemo() {  
        return this.memo;  
    }  
    public void setStatus(Integer status) {  
        this.status = status;  
    }        
	
    public Integer getStatus() {  
        return this.status;  
    }  
    public void setListTemplateId(Integer listTemplateId) {  
        this.listTemplateId = listTemplateId;  
    }        
	
    public Integer getListTemplateId() {  
        return this.listTemplateId;  
    }  
    public void setCreateTime(java.util.Date createTime) {  
        this.createTime = createTime;  
    }        
	
    public java.util.Date getCreateTime() {  
        return this.createTime;  
    }  
    public void setCreateUserId(Integer createUserId) {  
        this.createUserId = createUserId;  
    }        
	
    public Integer getCreateUserId() {  
        return this.createUserId;  
    }  
    public void setModifyTime(java.util.Date modifyTime) {  
        this.modifyTime = modifyTime;  
    }        
	
    public java.util.Date getModifyTime() {  
        return this.modifyTime;  
    }  
    public void setModifyUserId(Integer modifyUserId) {  
        this.modifyUserId = modifyUserId;  
    }        
	
    public Integer getModifyUserId() {  
        return this.modifyUserId;  
    }  
}